package kordegi.forumsystem.service.Impl;

import kordegi.forumsystem.entity.Article;
import kordegi.forumsystem.entity.User;
import kordegi.forumsystem.mapper.SortingMapper;
import kordegi.forumsystem.service.SortingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author kordegi
 * @date 2022.05.02 13:00
 * @Description
 */

@Service
public class SortingServiceImpl implements SortingService {

    @Autowired
    SortingMapper sortingMapper;

    /**
     * @param title
     * @return
     */
    @Override
    public List<Article> sortArticles(String title) {
        return sortingMapper.sortArticles(title);
    }

    /**
     * @param username
     * @return
     */
    @Override
    public List<User> sortUsers(String username) {
        return sortingMapper.sortUser(username);
    }
}
